import Layout from '@/layout'
import SettingEnv from '@/setting.env'

const system = 'system_'

export default {
  path: `${ SettingEnv.customRouter }/system`,
  name: 'order',
  component: Layout,
  alwaysShow: true,
  redirect: `${ SettingEnv.customRouter }/system`,
  meta: {
    title: '系统设置',
    icon: 'el-icon-s-tools'
  },
  children: [
    {
      path: 'siteConfig',
      name: `${ system }siteConfig`,
      component: () => import('@/views/system/siteConfig/index'),
      meta: {
        title: '站点设置'
      }
    },
    {
        path: `${system}admin`,
        name: `${system}admin`,
        alwaysShow: true,
        redirect: 'admin',
        component: () => import('@/views/system/admin/index'),
        meta: {
          title: '管理员'
        },
        children: [
          {
            path: 'role',
            component: () => import('@/views/system/admin/role/index'),
            name: `${system}Role`,
            meta: {
              title: '管理角色'
            }
          },
          {
            path: 'personnel',
            component: () => import('@/views/system/admin/personnel/index'),
            name: `${system}Personnel`,
            meta: {
              title: '管理人员'
            }
          },
          {
            path: 'personnelAdd',
            hidden: true,
            component: () => import('@/views/system/admin/personnelAdd/index'),
            name: `${system}PersonnelAdd`,
            meta: {
              title: '添加管理人员'
            }
          }
        ]
      }
  ]
}
